package com.itfreer.form.dao.base;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 树型字典表基类
 */
@MappedSuperclass
public abstract class JdbcTreeEntityBase extends JdbcEntityBase {

	private static final long serialVersionUID = -5472740525111837155L;

	/**
	 * 上级ID值
	 */
	@Column(name = "pid", length = 50, nullable = true)
	protected String pid;
	
	/**
	 * 级别
	 */
	@Column(name = "i_level", nullable = true)
	protected Integer level;
	
	@Column(name = "b_leaf", nullable = true)
	private Boolean leaf;

	/**
	 * 上级ID值
	 */
	public String getPid() {
		return pid;
	}

	/**
	 * 上级ID值
	 */
	public void setPid(String pid) {
		this.pid = pid;
	}

	/**
	 * 级别
	 */
	public Integer getLevel() {
		return level;
	}

	/**
	 * 级别
	 */
	public void setLevel(Integer level) {
		this.level = level;
	}
	
	/**
	 * 是否为最后节点
	 * @return
	 */
	public Boolean getLeaf() {
		return leaf;
	}

	/**
	 * 是否为最后节点
	 */
	public void setLeaf(Boolean leaf) {
		this.leaf = leaf;
	}
}
